-- GENERATED SPELL FOR [Munch] --


function spell0_30840(pUnit, Event) --@Blood Strike,n/a--
pUnit:FullCastSpellOnTarget(52374,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30840', 625, 1)
end

function spell1_30840(pUnit, Event) --@Icy Touch,n/a--
pUnit:FullCastSpellOnTarget(52372,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30840', 20000, 1)
end

function spell2_30840(pUnit, Event) --@Plague Strike,n/a--
pUnit:FullCastSpellOnTarget(52373,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30840', 12000, 1)
end

function Sorts_30840(pUnit, Event)
local choix_sorts_30840 = math.random(0, 2)
if choix_sorts_30840 == 0 then
pUnit:RegisterEvent('spell0_30840', 1, 1)
end
if choix_sorts_30840 == 1 then
pUnit:RegisterEvent('spell1_30840', 1, 1)
end
if choix_sorts_30840 == 2 then
pUnit:RegisterEvent('spell2_30840', 1, 1)
end
end

function mob30840_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_30840', math.random(1500, 3000), 1)
end

function mob30840_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob30840_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob30840_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(30840, 1, 'mob30840_Action')
RegisterUnitEvent(30840, 2, 'mob30840_Leave')
RegisterUnitEvent(30840, 3, 'mob30840_Kill')
RegisterUnitEvent(30840, 4, 'mob30840_Die')
